#ifndef _PAGE_VECTOR_H
#define _PAGE_VECTOR_H

#include <string>
#include <set>
#include <vector>
#include <tr1/memory>

namespace jsearch
{
	class page_vector
	{
		public:
			explicit page_vector( std::string db_name );

			bool restore( std::tr1::shared_ptr<std::vector<std::string> >& svec);

			std::set<std::string> get_term_set();
			std::set<int> get_page_id_set();

			double get_weight(std::string tm, int pid);
			double get_idf(std::string tm);

		private:
			struct Impl;
			std::tr1::shared_ptr<Impl> pimpl;
	};

}
#endif
